/*

function ShowMenu(obj,n){
	
 var Nav = obj.parentNode;
 
 if(!Nav.id){
  var BName = Nav.getElementsByTagName("ul");
  var HName = Nav.getElementsByTagName("h2");
  var t = 2;
 }else{
  var BName = document.getElementById(Nav.id).getElementsByTagName("span");
  var HName = document.getElementById(Nav.id).getElementsByTagName("h1");
  var t = 1;
 }
 
 for(var i=0; i<HName.length;i++){
  HName[i].innerHTML = HName[i].innerHTML.replace("-","+");
  HName[i].className = "";
 }
 
 obj.className = "h" + t;
 
 for(var i=0; i<BName.length; i++){
	 if(i!=n){BName[i].className = "no";}
 }
 
 if(BName[n].className == "no"){
  BName[n].className = "";
  obj.innerHTML = obj.innerHTML.replace("+","-");
 }else{
  BName[n].className = "no";
  obj.className = "";
  obj.innerHTML = obj.innerHTML.replace("-","+");
 }
}//menuлЧ

*/




function ShowMenu(obj,n){
	
 var Nav = obj.parentNode;
 
 if(!Nav.id){
  var BName = Nav.getElementsByTagName("ul");
  var HName = Nav.getElementsByTagName("h2");
  var t = 2;
 }else{
  var BName = document.getElementById(Nav.id).getElementsByTagName("span");
  var HName = document.getElementById(Nav.id).getElementsByTagName("h2");
  var t = 1;
 }
 
 for(var i=0; i<HName.length;i++){
  HName[i].innerHTML = HName[i].innerHTML.replace("-","+");
  HName[i].className = "";
 }
 
 obj.className = "h" + t;
 
 for(var i=0; i<BName.length; i++){
	 if(i!=n){BName[i].className = "";}
 }
 
 if(BName[n].className == ""){
  BName[n].className = "";
  obj.innerHTML = obj.innerHTML.replace("","");
 }else{
  BName[n].className = "";
  obj.className = "";
  obj.innerHTML = obj.innerHTML.replace("","");
 }
}


//tableлЧjs
function selectTag(showContent,selfObj){
	// ǩ
	var tag = document.getElementById("tags").getElementsByTagName("li");
	var taglength = tag.length;
	for(i=0; i<taglength; i++){
		tag[i].className = "";
	}
	selfObj.parentNode.className = "selectTag";
	// 
	for(i=0; j=document.getElementById("tagContent"+i); i++){
		j.style.display = "none";
	}
	document.getElementById(showContent).style.display = "block";		
}

function changeIFrameInfos(url){
	$("#contentFrame").attr("src",url);
	setIframeHeight();
}

function setIframeHeight(){
	$("#contentFrame").load(function(){         
		$("#contentFrame").height($(this).contents().find("body").attr('scrollHeight')); 
    });	
}